
Connect VPN

Version 1.3 (2013.09.04)
By BitFume
http://bitfume.com/

Overview

	This app is used to automate RSA + VPN connections on Mac OS X. It was developed for use with a specific corporate VPN, but may be used with others. The AppleScript source code is included.
	
	Version 1.3 addresses issues concerning window layering, missing configurations, and multiple network locations.

System Requirements

	- Mac OS X 10.4 or higher
	  (10.6 required for Cisco-type VPN)
	  
	- VPN profile in Mac OS X Network Preferences
	
	- RSA SecurID app
	  https://ssl.seagate.com/ssl/docs/softoken4mac.html
	  
	(May also require "Enable Access for Assistive Devices" in Accessibility Preferences)
  
How To Use

	Double-click the "Connect VPN" app and enter your VPN PIN. The app will launch SecurID, copy the token and close, and connect to the default VPN profile as set in Network Preferences (combining the PIN and SecurID token).
	
	Note: you'll need to have a VPN account setup through your organization's tech support before being able to connect.
	
Advanced Options
	
	Automatic PIN Entry
	
		If you place a file named pin.txt next to the app (containing your VPN PIN), you won't be prompted for a PIN each time. Simply double-click to toggle VPN on and off.
	
	Command Line Usage
	
		You can also launch "Connect VPN.scpt" from the command line using the options noted below (see "Command Line Options").

	Adding to the Menu Bar
	
		If you want to put the script in the menu bar:
	
		1) Launch AppleScript Editor (in Utilities)
		2) Check "Show Script menu in menu bar" in the Prefs
		3) From the new script menu, select "Open Scripts Folder > Open User Scripts Folder"
		4) Drop your script in the Scripts folder that appears
		
		If you want the VPN status to appear in the menu bar:
	
		1) Launch System Preferences
		2) Select Network Preferences
		3) Select your VPN profile
		4) Click "Show VPN status in menu bar"
		
		You can also connect to VPN from this menu, though you'll have to manually enter your PIN and RSA token.

Command Line Options

	osascript path/to/script.scpt [params]
	
	params
	[mode] [vpn] [pin] [rsa]
	
	mode
	The script mode: connect, disconnect, toggle. Default is toggle.
	
	vpn
	The name of the VPN profile to use, as defined in Network Preferences. If omitted, the script will use the first profile it can find.
	
	pin
	Your VPN PIN. If omitted, and there's no pin.txt file next to the script, you'll be prompted on connect.
	
	rsa
	Set to false to skip the RSA SecurID step. The provided PIN will then be used as the whole VPN key. Useful for adapting the script for use with VPNs that don't use a security token. Default is true.
	